<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
	<title>用户信息管理</title>
	<meta name="decorator" content="default"/>
	<script src="${ctxStatic}/layer/layer.js"></script>
	<script src="${ctxStatic}/js/widget/stickytableheaders/js/jquery.stickytableheaders.min.js"></script>
	<script type="text/javascript">
		$(document).ready(function() {
			$(".view_service_record").click(function(){
				var id=$(this).data("id");
					parent.layer.open({
						  type: 2,
						  title: '服务记录',
						  shadeClose: true,
						  shade: 0,
						  area: ['90%', '70%'],
						  content: '${ctx}/sys/member/member/seviceRecordPage?id='+id //iframe的url
					}); 
			});
			$("#contentTable").stickyTableHeaders();
		});

		function page(n,s){
			$("#pageNo").val(n);
			$("#pageSize").val(s);
			$("#searchForm").submit();
        	return false;
        }
	</script>


</head>
<body>
	<ul class="nav nav-tabs">
		<li class="active"><a href="${ctx}/sys/member/member/">用户信息列表</a></li>
		<shiro:hasPermission name="sys:member:member:edit"><li><a href="${ctx}/sys/member/member/form">用户信息添加</a></li></shiro:hasPermission>
	</ul>

	<form:form id="searchForm" modelAttribute="member" action="${ctx}/sys/member/member/" method="post" class="breadcrumb form-search">
		<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
		<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
		<ul class="ul-form">
			<li><label>电话：</label>
				<form:input path="username" htmlEscape="false" maxlength="64" class="input-medium"/>
			</li>
			<li><label>身份证号码：</label>
				<form:input path="idCard" htmlEscape="false" maxlength="64" class="input-medium"/>
			</li>
			<li><label>真实姓名：</label>
				<form:input path="realname" htmlEscape="false" maxlength="64" class="input-medium"/>
			</li>
			<li class="btns"><input id="btnSubmit" class="btn btn-primary" type="submit" value="查询"/></li>
			<li class="clearfix"></li>
		</ul>
	</form:form>
	<sys:message content="${message}"/>
			<table id="contentTable" class="table table-striped table-bordered table-condensed">
				<thead style="top: 0">
				<tr>
					<th style="width: 5%">用户名</th>
					<th style="width: 5%">昵称</th>
					<th style="width: 5%">真实姓名</th>
					<th style="width:5%">商务人员</th>
					<th style="width: 5%">性别</th>
					<th style="width: 5%">出生日期</th>
					<th style="width: 5%">身份证号码</th>
					<shiro:hasPermission name="sys:member:member:sr:view">
						<th style="width: 4%">服务记录</th>
					</shiro:hasPermission>
					<th style="width: 10%">操作</th>
				</tr>
				</thead>
				<tbody >
				<c:forEach items="${page.list}" var="member">
					<tr>
						<td style="width: 5%"><a href="${ctx}/sys/member/member/form?id=${member.id}">
							${member.usernameFake}
						</a></td>
						<td style="width: 5%">
							${member.nickname}
						</td>
						<td style="width: 5%">
							${member.realname}
						</td>
						<td style="width: 5%">
								${member.managerName}
						</td>
						<td style="width: 5%">
								${member.sex}
						</td>
						<td style="width: 5%">
								${member.birthdayStr}
						</td>
						<td style="width: 5%">
							${member.idCard}
						</td>
				<%--		<td style="width: 5%">
							<fmt:formatDate value="${member.updateDate}" pattern="yyyy-MM-dd HH:mm:ss"/>
						</td>
						<td style="width: 5%">
							${member.remarks}
						</td>--%>
						<shiro:hasPermission name="sys:member:member:sr:view">
						<td style="width: 4%">
						<a href="#" class="view_service_record" data-id="${member.id}">查看更多</a>
						</td>
						</shiro:hasPermission>
						<td style="width: 10%">
							<shiro:hasPermission name="sys:member:member:edit">	<a href="${ctx}/sys/member/member/form?id=${member.id}">修改</a></shiro:hasPermission>
							<shiro:hasPermission name="sys:member:member:bankcardmanager"><a href="${ctx}/sys/member/member/bankcardList?id=${member.id}">银行卡管理</a></shiro:hasPermission>
							<shiro:hasPermission name="sys:member:member:uploadmaterial">	<a  href="${ctx}/sys/member/member/uploadPage?id=${member.id}">上传资料</a></shiro:hasPermission>
							<shiro:hasPermission name="sys:member:member:downloadmaterial"><a href="${ctx}/sys/member/member/downLoadMaterials?id=${member.id}" onclick="return confirmx('确认要下载该用户的资料吗？', this.href)">下载资料</a></shiro:hasPermission>
							<shiro:hasPermission name="sys:member:member:inputapply"><a  href="${ctx}/sys/member/member/inputApplyPage?id=${member.id}">客户录单</a></shiro:hasPermission>
							<shiro:hasPermission name="sys:member:member:applymaterial"><a  href="${ctx}/sys/member/member/checkFormPage?id=${member.id}">审核资料</a></shiro:hasPermission>
							<shiro:hasPermission name="sys:member:member:edit"><a href="${ctx}/sys/member/member/delete?id=${member.id}" onclick="return confirmx('确认要删除该用户信息吗？', this.href)">删除</a></shiro:hasPermission>
							<shiro:hasPermission name="sys:member:member:applymaterial"><a  href="${ctx}/sys/member/member/membermate?id=${member.id}">产品匹配度</a></shiro:hasPermission>
						</td>
					</tr>
				</c:forEach>
				</tbody>
			</table>
			<div class="pagination">${page}</div>

</body>
</html>